Creating Application Programming Interface Code Templates from Usage Patterns

نویسنده

  • Tristan Joseph Ratchford
چکیده

Application programing interfaces promote reuse by facilitating interaction between software components and/or software libraries. API code templates are parameterized API scenarios that can be quickly instantiated by copy-and-pasting or through support from integrated development environments. They provide the skeletal structure of an API coding scenario and let developers simply “fill in the blanks” with the details of their coding task. Unfortunately, creating relevant API code templates requires time and experience with the API. To address these problems we present a technique that mines API usage patterns and transforms them into API code templates. Our intuition is that API usage patterns are a solid basis for code templates because they are grounded by actual API usage. We evaluate our approach performing retroactive study on the Mammoth, ArgoUML, and Eclipse projects to see if API code templates created from earlier versions could have been helpful to developers in later versions. Our results show that, on average, each API code template our technique mined could have helped developers with creating six, nine, and twelve new methods in Mammoth, ArgoUML, and Eclipse, respectively. In our evaluation, we mined many API code templates from the three test projects that provide evidence that our technique could have helped developers learn and use an API faster in many opportunities.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dynamic Frames Based Generation of 3D Scenes and Applications Author

Modern graphic/programming tools like Unity enables the possibility of creating 3D scenes as well as making 3D scene based program applications, including full physical model, motion, sounds, lightning effects etc. This paper deals with the usage of dynamic frames based generator in the automatic generation of 3D scene and related source code. The suggested model enables the possibility to spec...

متن کامل

Design Patterns for Annotation-based APIs

With the introduction of code annotations in popular languages like Java and C#, several frameworks and platforms adopted a metadatabased API (Application Programming Interface). By using this approach, instead of extending classes, implementing interfaces or invoking configuration methods, the API demand its users to add metadata through annotations in their classes. This approach can bring se...

متن کامل

Mining API Usage Patterns by Applying Method Categorization to Improve Code Completion

Developers often face difficulties while using APIs. API usage patterns can aid them in using APIs efficiently, which are extracted from source code stored in software repositories. Previous approaches have mined repositories to extract API usage patterns by simply applying data mining techniques to the collection of method invocations of API objects. In these approaches, respective functional ...

متن کامل

Could We Infer API Usage Patterns only using the Library Source Code?

Learning to use existing or new software libraries is a difficult task for software developers, which would impede their productivity. Much existing work has provided different techniques to mine API usage patterns from client programs in order to help developers on understanding and using existing libraries. However, considering only client programs to identify API usage patterns is a strong c...

متن کامل

pyiwn: A Python-based API to access Indian Language WordNets

Indian language WordNets have their individual web-based browsing interfaces along with a common interface for IndoWordNet. These interfaces prove to be useful for language learners and in an educational domain, however, they do not provide the functionality of connecting to them and browsing their data through a lucid application programming interface or an API. In this paper, we present our w...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011